/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Andres
 */
@Embeddable
public class SolicitudinsumoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "SOLICITUD_IDSOLICITUD", nullable = false)
    private int solicitudIdsolicitud;
    @Basic(optional = false)
    @Column(name = "INSUMO_IDINSUMO", nullable = false)
    private int insumoIdinsumo;

    public SolicitudinsumoPK() {
    }

    public SolicitudinsumoPK(int solicitudIdsolicitud, int insumoIdinsumo) {
        this.solicitudIdsolicitud = solicitudIdsolicitud;
        this.insumoIdinsumo = insumoIdinsumo;
    }

    public int getSolicitudIdsolicitud() {
        return solicitudIdsolicitud;
    }

    public void setSolicitudIdsolicitud(int solicitudIdsolicitud) {
        this.solicitudIdsolicitud = solicitudIdsolicitud;
    }

    public int getInsumoIdinsumo() {
        return insumoIdinsumo;
    }

    public void setInsumoIdinsumo(int insumoIdinsumo) {
        this.insumoIdinsumo = insumoIdinsumo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) solicitudIdsolicitud;
        hash += (int) insumoIdinsumo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SolicitudinsumoPK)) {
            return false;
        }
        SolicitudinsumoPK other = (SolicitudinsumoPK) object;
        if (this.solicitudIdsolicitud != other.solicitudIdsolicitud) {
            return false;
        }
        if (this.insumoIdinsumo != other.insumoIdinsumo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.SolicitudinsumoPK[solicitudIdsolicitud=" + solicitudIdsolicitud + ", insumoIdinsumo=" + insumoIdinsumo + "]";
    }

}
